package com.bsoft.gol.hcs.common.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "fus_consult_ask")
public class FusConsultAsk {
    private long fusConsultAskId;
    private String consultId;
    private String orgId;
    private String orgName;
    private String deptId;
    private String deptName;
    private String consultType;
    private String createUserId;
    private String consultMpiId;
    private String personName;
    private Long age;
    private String gender;
    private String phoneNo;
    private String doctorId;
    private String doctorName;
    private String question;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh_CN", timezone = "GMT+8")
    private Date finishedTime;
    private String patientCode;
    private String patientIdentityCardType;
    private String patientIdentityCardNumber;
    private String patientMedicalCardType;
    private String patientMedicalCardNumber;

    @Id
    @Column(name = "fus_consult_ask_id")
    public long getFusConsultAskId() {
        return fusConsultAskId;
    }

    public void setFusConsultAskId(long fusConsultAskId) {
        this.fusConsultAskId = fusConsultAskId;
    }

    @Basic
    @Column(name = "consult_id")
    public String getConsultId() {
        return consultId;
    }

    public void setConsultId(String consultId) {
        this.consultId = consultId;
    }

    @Basic
    @Column(name = "org_id")
    public String getOrgId() {
        return orgId;
    }

    public void setOrgId(String orgId) {
        this.orgId = orgId;
    }

    @Basic
    @Column(name = "org_name")
    public String getOrgName() {
        return orgName;
    }

    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }

    @Basic
    @Column(name = "dept_id")
    public String getDeptId() {
        return deptId;
    }

    public void setDeptId(String deptId) {
        this.deptId = deptId;
    }

    @Basic
    @Column(name = "dept_name")
    public String getDeptName() {
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    @Basic
    @Column(name = "consult_type")
    public String getConsultType() {
        return consultType;
    }

    public void setConsultType(String consultType) {
        this.consultType = consultType;
    }

    @Basic
    @Column(name = "create_user_id")
    public String getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(String createUserId) {
        this.createUserId = createUserId;
    }

    @Basic
    @Column(name = "consult_mpi_id")
    public String getConsultMpiId() {
        return consultMpiId;
    }

    public void setConsultMpiId(String consultMpiId) {
        this.consultMpiId = consultMpiId;
    }

    @Basic
    @Column(name = "person_name")
    public String getPersonName() {
        return personName;
    }

    public void setPersonName(String personName) {
        this.personName = personName;
    }

    @Basic
    @Column(name = "age")
    public Long getAge() {
        return age;
    }

    public void setAge(Long age) {
        this.age = age;
    }

    @Basic
    @Column(name = "gender")
    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    @Basic
    @Column(name = "phone_no")
    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String phoneNo) {
        this.phoneNo = phoneNo;
    }

    @Basic
    @Column(name = "doctor_id")
    public String getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(String doctorId) {
        this.doctorId = doctorId;
    }

    @Basic
    @Column(name = "doctor_name")
    public String getDoctorName() {
        return doctorName;
    }

    public void setDoctorName(String doctorName) {
        this.doctorName = doctorName;
    }

    @Basic
    @Column(name = "question")
    public String getQuestion() {
        return question;
    }

    public void setQuestion(String question) {
        this.question = question;
    }

    @Basic
    @Column(name = "create_time")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }


    @Basic
    @Column(name = "finished_time")
    public Date getFinishedTime() {
        return finishedTime;
    }

    public void setFinishedTime(Date finishedTime) {
        this.finishedTime = finishedTime;
    }


    @Basic
    @Column(name = "patient_code")
    public String getPatientCode() {
        return patientCode;
    }

    public void setPatientCode(String patientCode) {
        this.patientCode = patientCode;
    }

    @Basic
    @Column(name = "patient_identity_card_type")
    public String getPatientIdentityCardType() {
        return patientIdentityCardType;
    }

    public void setPatientIdentityCardType(String patientIdentityCardType) {
        this.patientIdentityCardType = patientIdentityCardType;
    }

    @Basic
    @Column(name = "patient_identity_card_number")
    public String getPatientIdentityCardNumber() {
        return patientIdentityCardNumber;
    }

    public void setPatientIdentityCardNumber(String patientIdentityCardNumber) {
        this.patientIdentityCardNumber = patientIdentityCardNumber;
    }

    @Basic
    @Column(name = "patient_medical_card_type")
    public String getPatientMedicalCardType() {
        return patientMedicalCardType;
    }

    public void setPatientMedicalCardType(String patientMedicalCardType) {
        this.patientMedicalCardType = patientMedicalCardType;
    }

    @Basic
    @Column(name = "patient_medical_card_number")
    public String getPatientMedicalCardNumber() {
        return patientMedicalCardNumber;
    }

    public void setPatientMedicalCardNumber(String patientMedicalCardNumber) {
        this.patientMedicalCardNumber = patientMedicalCardNumber;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        FusConsultAsk that = (FusConsultAsk) o;
        return fusConsultAskId == that.fusConsultAskId &&
                Objects.equals(consultId, that.consultId) &&
                Objects.equals(orgId, that.orgId) &&
                Objects.equals(orgName, that.orgName) &&
                Objects.equals(deptId, that.deptId) &&
                Objects.equals(deptName, that.deptName) &&
                Objects.equals(consultType, that.consultType) &&
                Objects.equals(createUserId, that.createUserId) &&
                Objects.equals(consultMpiId, that.consultMpiId) &&
                Objects.equals(personName, that.personName) &&
                Objects.equals(age, that.age) &&
                Objects.equals(gender, that.gender) &&
                Objects.equals(phoneNo, that.phoneNo) &&
                Objects.equals(doctorId, that.doctorId) &&
                Objects.equals(doctorName, that.doctorName) &&
                Objects.equals(question, that.question) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(finishedTime, that.finishedTime) &&
                Objects.equals(patientCode, that.patientCode) &&
                Objects.equals(patientIdentityCardType, that.patientIdentityCardType) &&
                Objects.equals(patientIdentityCardNumber, that.patientIdentityCardNumber) &&
                Objects.equals(patientMedicalCardType, that.patientMedicalCardType) &&
                Objects.equals(patientMedicalCardNumber, that.patientMedicalCardNumber);
    }

    @Override
    public int hashCode() {
        return Objects.hash(fusConsultAskId, consultId, orgId, orgName, deptId, deptName, consultType, createUserId, consultMpiId, personName, age, gender, phoneNo, doctorId, doctorName, question, createTime,  finishedTime,  patientCode, patientIdentityCardType, patientIdentityCardNumber, patientMedicalCardType, patientMedicalCardNumber);
    }
}
